package com.langshixiaobai.mqdemo.server.core;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

//属性配置
@Data
@NoArgsConstructor
@AllArgsConstructor
//配置属性
public class BasicProperties implements Serializable {

    //消息唯一标识符，为了保证id唯一性，这里用UUID来保证
    private String messageId;
    // 路由键  direct exchange routingKey为队列名字
    // Topic exchange routing key要和binding key一致
    // Fanout exchange routing key无作用，因为每个队列都要收到相同消息
    private String routingKey;

    //消息是否持久化 1 不持久化 2 持久化
    private Integer deliverMode = 1;

}
